home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / DriverSynchronization.p < prev    next >
Text File  |  1996-05-01  |  3KB  |  83 lines

  1. {
  2.      File:        DriverSynchronization.p
  3.  
  4.      Contains:    Driver Synchronization Interfaces.
  5.  
  6.      Version:    Technology:    Sustem 7.5 and 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT DriverSynchronization;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRIVERSYNCHRONIZATION__}
  28. {$SETC __DRIVERSYNCHRONIZATION__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DriverSynchronizationIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  41. {$IFC UNDEFINED __SYNCHRONIZATION__}
  42. {$I Synchronization.p}
  43. {$ENDC}
  44. {$ENDC}
  45.  
  46. {$PUSH}
  47. {$ALIGN MAC68K}
  48. {$LibExport+}
  49.  
  50. FUNCTION CompareAndSwap(oldVvalue: UInt32; newValue: UInt32; VAR OldValueAdr: UInt32): BOOLEAN; C;
  51. FUNCTION TestAndClear(bit: UInt32; VAR startAddress: UInt8): BOOLEAN; C;
  52. {$IFC FOR_SYSTEM7_ONLY }
  53. FUNCTION TestAndSet(bit: UInt32; VAR startAddress: UInt8): BOOLEAN; C;
  54. FUNCTION IncrementAtomic8(VAR value: SInt8): SInt8; C;
  55. FUNCTION DecrementAtomic8(VAR value: SInt8): SInt8; C;
  56. FUNCTION AddAtomic8(amount: SInt32; VAR value: SInt8): SInt8; C;
  57. FUNCTION BitAndAtomic8(mask: UInt32; VAR value: UInt8): ByteParameter; C;
  58. FUNCTION BitOrAtomic8(mask: UInt32; VAR value: UInt8): ByteParameter; C;
  59. FUNCTION BitXorAtomic8(mask: UInt32; VAR value: UInt8): ByteParameter; C;
  60. {$ENDC}
  61. FUNCTION IncrementAtomic16(VAR value: SInt16): SInt16; C;
  62. FUNCTION DecrementAtomic16(VAR value: SInt16): SInt16; C;
  63. FUNCTION AddAtomic16(amount: SInt32; VAR value: SInt16): SInt16; C;
  64. FUNCTION BitAndAtomic16(mask: UInt32; VAR value: UInt16): UInt16; C;
  65. FUNCTION BitOrAtomic16(mask: UInt32; VAR value: UInt16): UInt16; C;
  66. FUNCTION BitXorAtomic16(mask: UInt32; VAR value: UInt16): UInt16; C;
  67. FUNCTION IncrementAtomic(VAR value: SInt32): SInt32; C;
  68. FUNCTION DecrementAtomic(VAR value: SInt32): SInt32; C;
  69. FUNCTION AddAtomic(amount: SInt32; VAR value: SInt32): SInt32; C;
  70. FUNCTION BitAndAtomic(mask: UInt32; VAR value: UInt32): UInt32; C;
  71. FUNCTION BitOrAtomic(mask: UInt32; VAR value: UInt32): UInt32; C;
  72. FUNCTION BitXorAtomic(mask: UInt32; VAR value: UInt32): UInt32; C;
  73. {$ALIGN RESET}
  74. {$POP}
  75.  
  76. {$SETC UsingIncludes := DriverSynchronizationIncludes}
  77.  
  78. {$ENDC} {__DRIVERSYNCHRONIZATION__}
  79.  
  80. {$IFC NOT UsingIncludes}
  81.  END.
  82. {$ENDC}
  83.